﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace Windvoice.Album.Model
{
    public class PhotoCommentInfo
    {
        //id, author, authorid, cotent, [time], ip, photoid, reply, replytime
        private int _ID;
        private string _Author;
        private int _AuthorID;
        private string _Content;
        private DateTime _Time;
        private string _IP;
        private int _PhotoID;
        private string _Reply;
        private DateTime _ReplyTime;

        public PhotoCommentInfo()
        { }

        public PhotoCommentInfo(DataRow row)
        {
            _ID = int.Parse(row["id"].ToString());
            _Author = row["author"].ToString();
            _AuthorID = int.Parse(row["authorid"].ToString());
            _Content = row["content"].ToString();
            _Time = DateTime.Parse(row["time"].ToString());
            _IP = row["ip"].ToString();
            _PhotoID = int.Parse(row["photoid"].ToString());
            _Reply = row["reply"].ToString();
            _ReplyTime = DateTime.Parse(row["replytime"].ToString());
        }

        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }
        public string Author
        {
            get { return _Author; }
            set { _Author = value; }
        }
        public int AuthorID
        {
            get { return _AuthorID; }
            set { _AuthorID = value; }
        }
        public string Content
        {
            get { return _Content; }
            set { _Content = value; }
        }
        public DateTime Time
        {
            get { return _Time; }
            set { _Time = value; }
        }
        public string IP
        {
            get { return _IP; }
            set { _IP = value; }
        }
        public int PhotoID
        {
            get { return _PhotoID; }
            set { _PhotoID = value; }
        }
        public string Reply
        {
            get { return _Reply; }
            set { _Reply = value; }
        }
        public DateTime ReplyTime
        {
            get { return _ReplyTime; }
            set { _ReplyTime = value; }
        }
    }
}
